import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/Login',
  },
  {
    path: '/Login',
    component: () => import('../views/Login/Login')
  },
  {
    path: '/First',
    redirect: '/Home',
    component: () => import('../views/First/First'),
    children: [
      {
        path: '/Home',
        component: () => import('../views/Home/Home')
      },
      {
        path: '/List',
        component: () => import('../views/List/List')
      },
      {
        path: '/Profile',
        component: () => import('../views/Profile/Profile')
      }
    ]
  },
  {
    path: '/Map',
    component: () => import('../views/Map/Map')
  },
  {
    path: '/CityList',
    component: () => import('../views/CityList/CityList')
  },
  {
    path: '/Rent',
    component: () => import('../views/Rent/Rent'),
  },
  {
    path: '/Rent/Add',
    component: () => import('../views/Add/Add')
  },
  {
    path: '/Rent/Search',
    component: () => import('../views/Search/Search')
  },
  {
    path: '/History',
    component: () => import('../views/History/History')
  },
  {
    path: '/Detail',
    component: () => import('../views/Detail/Detail')
  }
]

const router = new VueRouter({
  routes
})

export default router
